<!DOCTYPE html>
<html lang="zh-CN">
<head>
    {% block head %}
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{% block title -%}{%- endblock %}</title>
    {% block style %}{{ bootstrap.load_css() }}{% endblock %}
    {% endblock %}
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark sticky-top">
    <a href="{{ url_for('index') }}" class="navbar-brand">首页</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarNav">
        <ul class="navbar-nav">
        {% block nav -%}{%- endblock %}
        </ul>
    <form class="form-inline" action="{{ url_for('search') }}">
        <input class="form-control mr-sm-2" type="search" name="q" placeholder="Search" aria-label="Search">
        <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
    </form>
    </div>
</nav>
    {% block content %}{% endblock %}
<footer>
    {% block footer %}{% endblock %}
</footer>
{% block scripts %}
{{ bootstrap.load_js() }}
{% endblock %}
</body>
</html>